package com.lingnan.entity.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import jakarta.validation.constraints.*;

import java.util.Date;


@Data
public class Company {
    @TableId(type = IdType.AUTO)
    private Long id;
    private Long userId;
    @NotBlank(message = "企业名称不能为空")
    @Size(max = 100, message = "企业名称长度不能超过100个字符")
    private String name;

    @Size(max = 50, message = "营业执照号长度不能超过50个字符")
    private String licenseNo;

    @Size(max = 255, message = "营业执照图片URL长度不能超过255个字符")
    private String licenseImg;

    @Size(max = 50, message = "行业长度不能超过50个字符")
    private String industry;

    @Size(max = 20, message = "企业规模长度不能超过20个字符")
    private String scale;

    @Size(max = 200, message = "企业地址长度不能超过200个字符")
    private String address;

    @Size(max = 100, message = "企业官网长度不能超过100个字符")
    private String website;

    @Min(value = 0, message = "状态必须为0-2之间")
    @Max(value = 2, message = "状态必须为0-2之间")
    private Integer status = 0;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createdAt;
    private Long updateId;

}